package wu.example.userservernacos.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Value;
import wu.example.serviceapi.service.UserService;

/**
 * @author benjamin_5
 * @Description
 * @date 2022/11/19
 */
@DubboService
public class UserServiceImpl implements UserService {
    @Value("${server.port}")
    private Integer port;

    @Value("${spring.application.name}")
    private String serverName;

    @Override
    public String getUserById(Integer id){
        return "nacos用户" + id;
    }

    @Override
    public String getInfo(){
        return "服务："+serverName + ", 端口："+port;
    }
}
